package com.aaa.mapper;

import com.aaa.entity.FrontUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Bean
 * @since 2021-09-02
 */
public interface FrontUserMapper extends BaseMapper<FrontUser> {
    //登录
    List<Map<String,Object>> login(@Param("uname")String username,@Param("psw")String password);
    //注册
    Integer add(@Param("uname") String uname,@Param("username") String username,@Param("password") String password,@Param("photo") String photo,@Param("phone") String phone,@Param("sex") Integer sex);

    //查询用户信息  如果是自己查看只传入uid 不传id 传双id的作用是判断是否关注
    List<Map<String,Object>> seleuser(@Param("uid") Integer uid,@Param("id") Integer id);

    //查询用户的关注
    List<Map<String,Object>> attenuser(Integer id);

    //查询用户的粉丝
    List<Map<String,Object>> fansuser(Integer id);

    //查询消息列表
    List<Map<String,Object>> seleinform(Integer uid);
}
